# Short Description: In IDE Textual help file system
# Long Description:
#  Usage; eval briefs() to get started
#  Official Extensions will have a brief file.
#  As will appear entries for the ide itself
#
# EOD
#
# Requires:



class Briefs
  def initialize()
    @briefs = []
    Dir.open("libs/extentions/briefs").each {|f|
      if f.basename =~ /(.*)\.brf/
        @briefs << [$1,File.open("libs/extentions/briefs/#{$1}.brf").readlines.join]
      end
    }
  end
  def add_brief(name,body)
    @briefs << [name,body]
  end
  def get_toc
    str = ""
    @briefs.each_with_index {|brief,i|
      str << "#{i} : #{brief[0]}\n"   
    }
    return str 
  end
  def get_brief(index)
# p @briefs
    return @briefs[index][1]
  end
end
@briefsObject = Briefs::new
  